package com.chase.passwordmaster.mine.export

import com.chase.passwordmaster.entity.DecryptedAccount

open class ExternalDecryptedAccount(
    var website: String,
    var username: String,
    var password: String,
    var name: String? = null,
    var tel: String? = null,
    var qq: String? = null,
    var weChat: String? = null,
    var email: String? = null,
    var memo: String? = null
) {
    constructor(decryptedAccount: DecryptedAccount) : this(
        decryptedAccount.website,
        decryptedAccount.username,
        decryptedAccount.password,
        decryptedAccount.name,
        decryptedAccount.tel,
        decryptedAccount.qq,
        decryptedAccount.weChat,
        decryptedAccount. email,
        decryptedAccount.memo
    )

    fun toDecryptedAccount(): DecryptedAccount =
        DecryptedAccount(
            website, username, password, name, tel, qq, weChat, email, memo
        )
}